package com.azt.provider.mapper;

import com.azt.api.pojo.LevelRecord;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface LevelRecordMapper extends Mapper<LevelRecord> {

    /**
     * 根据条件查询
     */
    List<LevelRecord> selectByCondition(@Param("params") Map<String, Object> params);

    /**
     * 统计这公司利用这条规则今日增加的成长值
     */
    int selectSumAmountToday(@Param("ruleId") Integer ruleId, @Param("companyId") Integer companyId);

    /**
     * 该公司用了多少这个规则
     */
    int selectCompanyCount(@Param("ruleId") Integer ruleId, @Param("companyId") Integer companyId);

}